<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="shortcut icon" href="${ctx}/image/favicon.ico">
	<link rel="stylesheet" href="${ctx}/plugins/bootstrap/css/bootstrap.min.css"/>
	<link rel="stylesheet" href="${ctx}/plugins/font-awesome/css/font-awesome.min.css"/>
	<link rel="stylesheet" href="${ctx}/plugins/bootstrap/css/bootstrap.min.css"/>
	<link rel="stylesheet" href="${ctx}/custom/css/login.css"/>
</head>
<body>
	<nav class="navbar navbar-default navbar-fixed-top">
		<div class="navbar-header">
			<a class="logo-a"></a>
		</div>
	</nav>
	<div class="login-content">
		<div class="login-bg"></div>
		<div class="login-box">
			<form id="loginForm" action="${ctx}/login/doLogin" class="login-form" method="post">
				<div class="login-title">
					用户登录
					<#if error??>
						<span class="pull-right login-error"> ${error!}</span>
					</#if>
				</div>
				<div class="form-group has-feedback">
					<input type="text" class="form-control" name="userName" placeholder="请输入账号" autocomplete="off">
					<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<input type="password" class="form-control" name="password" placeholder="请输入密码" autocomplete="off" >
					<span class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<div class="vcode-content">
						<input type="text" name="captcha" autocomplete="off"  class="form-control vcode-input" placeholder="验证码">
						<span class="fa fa-key vcode-icon form-control-feedback"></span>
					</div>
					<img title="如果看不清楚，请单击图片刷新！" id="vcode-img" class="vcode-img" src="${ctx}/login/captcha" onclick="changeCode();" width="91" height="35">
				</div>
				<div class="row">
					<div class="col-xs-12">
						<button type="submit" class="btn btn-info btn-block">登录</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="copyright-light copyright-section">
		<p>Copyright © 2021. All rights reserved.</p>
	</div>
	<script src="${ctx}/plugins/jQuery/jQuery-2.1.4.min.js"></script>
	<script src="${ctx}/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script>
		if (window.top!==window.self) { alert('未登录或登录超时。请重新登录'); window.top.location=window.location };
		function changeCode() {
			$("#vcode-img").attr('src', '${ctx}/login/captcha?' + Math.floor(Math.random() * 100));
		};
	</script>
</body>
</html>
